//
//  MKPageControl.m
//  Jingjing
//
//  Created by Maxwell Rose on 15/11/10.
//  Copyright © 2015年 Mikeshihua. All rights reserved.
//

#import "MKPageControl.h"

@implementation MKPageControl

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (void)setCurrentPage:(NSInteger)currentPage{
    [super setCurrentPage:currentPage];
//    CGFloat numberOfPages = (CGFloat)[self.subviews count];
//    for (NSUInteger subviewIndex = 0; subviewIndex < [self.subviews count]; subviewIndex++) {
//        UIImageView* subview = [self.subviews objectAtIndex:subviewIndex];
//        CGSize size;
//        NSLog(@" %d | %s | %@",__LINE__,__FUNCTION__,subview);
//
//        size.height = 12;
//        size.width = 12;
//        CGFloat x = (subviewIndex - (numberOfPages / 2)) * 10.0 + subview.frame.origin.x;
//        [subview setFrame:CGRectMake(x, subview.frame.origin.y,
//                                     size.width,size.height)];
//        subview.layer.cornerRadius = size.width / 2.0;
//        subview.layer.masksToBounds = YES;
    
//        if (subviewIndex == currentPage) [subview setImage:[UIImage imageNamed:@"BluePoint.png"]];
//        else [subview setImage:[UIImage imageNamed:@"BlackPoint.png"]];
//    }
}
@end
